﻿
<script src="~/Scripts/jquery.hiMallDatagrid.js"></script>
<script src="~/Scripts/jquery.himallLinkage.nocreate.js"></script>
<script src="~/Scripts/jquery.placeholder.min.js"></script>
<script src="~/Scripts/bootstrap.autocomplete.js"></script>
<link href="~/Content/bootstrap-datetimepicker.min.css" rel="stylesheet" />
<script src="~/Scripts/bootstrap-datetimepicker.js"></script>
<script src="~/Scripts/bootstrap-datetimepicker.zh-CN.js"></script>
<script>    var val = "@Request.QueryString["status"]";</script>
<script src="~/Areas/SellerAdmin/Scripts/productManagement.js"></script>
<script>
    $(function () { 
        $('.nav li').each(function () {
            if ($(this).attr("type") == val) {
                $(this).trigger("click");
            }
        });
    });
</script>
<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>商品</strong>
        <li class="active" type="onSale" value="1"><a>销售中</a></li>
        <li type="unAudit" value="1,3"><a>待审核</a></li>
        <li type="inStock" value="2"><a>仓库中</a></li>
        <li type="saleOff" value="4"><a>违规下架</a></li>
        <li type="inDraft" value="3"><a>草稿箱</a></li>
        <em class="primary-btn">
            <span class="glyphicon glyphicon-question-sign"></span>
            <div class="primary">
                <h3>温馨提示：</h3>
                <span>*</span><p>管理、审核商品，以及处理违规下架等操作，违规商品可根据下架原因修改商品后由平台管理员重新审核</p>
            </div>
        </em>
    </ul>
    <div class="search-box">
        <form class="custom-inline">
            <div class="form-group" filter normal audit saleoff>
                <label class="label-inline" for="">商品名称</label>
                <input class="form-control input-ssm" type="text" id="searchBox">
            </div>
            <div class="form-group" filter audit>
                <label class="label-inline" for="">审核状态</label>
                <select class="form-control input-ssm" name="auditState">
                    <option value="1,3">全部</option>
                    <option value="1">待审核</option>
                    <option value="3">未通过</option>
                </select>
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">商品货号</label>
                <input class="form-control input-ssm" type="text" id="productId">
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">商品分类</label>
                <select id="category1" class="form-control input-ssm">
                    <option>分类</option>
                </select>
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">二级分类</label>
                <select id="category2" class="form-control input-ssm">
                    <option>分类</option>
                </select>
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">品牌</label>
                <input class="form-control input-ssm" type="text" id="brandBox" autocomplete="off">
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">开始日期</label>
                <input class="form-control input-ssm start_datetime" type="text" >
                <i class="glyphicon glyphicon-calendar"></i>
            </div>
            <div class="form-group" filter normal>
                <label class="label-inline" for="">结束日期</label>
                <input class="form-control input-ssm end_datetime" type="text" >
                <i class="glyphicon glyphicon-calendar"></i>
            </div>

            <div class="submit" normal><button type="button" class="btn btn-primary btn-sm" id="searchButton">搜 索</button></div>
        </form>
    </div>
    <table id="list" class="table"></table>
    <div class="tabel-operate" id="saleOff">
        <a class="btn btn-danger btn-ssm" id="batchDelete">批量删除</a>
        <a class="btn btn-default btn-ssm" id="batchSaleOff" style="display:none">下架</a>
        <a class="btn btn-default btn-ssm" id="batchOnSale" style="display:none">上架</a>
        <a class="btn btn-default btn-ssm" id="associateTemplate">关联版式</a>
    </div>
</div>

<div style="display:none" id="publish">
    <wb:publish action="publish" id="wb_publisher"></wb:publish>
</div>
<div class="form-group" id="weixinQrCode" style="display:none">
    <img id="QrCode" />
</div>
<script>
    function showQrCode(imgSrc) {
        $.dialog({
            title: '二维码',
            lock: true,
            id: 'weixinQrCode',
            content: $("#weixinQrCode").html(),
            padding: '10px',
            init: function () {
                $("#QrCode").attr('src', imgSrc)
            }
        });
    }
    var AuditOnOff = '@ViewBag.AuditOnOff';
</script>